<%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2020/11/8
  Time: 20:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>北方民族大学学生留言系统</title>
    <style>
        .lefttop,.leftbottom{
            background: rgb(35,35,35);
        }
    </style>
</head>
<script src="/WebContent/JQuery/jquery-3.4.1.js" type="text/javascript"></script>
<script>
    $(document).ready(function () {
         window.onload = function () {
             $.ajax({
                 url:"/AdminLoginServlet?type=cgloginstate",
                 data:"id=${sessionScope.admin.adminId}",
                 dataType:"text",
                 async:true,
                 success:function (data) {
                     if(data == "1"){
                         console.log("欢迎使用！");
                     }else{
                         $.ajax({
                             url:"/AdminLoginServlet",
                             type:"get",
                             data:{"type":"tc"},
                             datatype:"text",
                             success:function (data) {
                                 if(data == "1"){
                                     alert("您的登录已过期，请重新登陆");
                                     parent.location.href = "/WebContent/HTML/AdminLogin.jsp";
                                 }else if(data == "0"){
                                     window.alert("操作失败，请重新尝试！");
                                 }
                             },
                             error:function (error) {
                                 alert("系统繁忙，请稍后再试！");
                             }
                         })
                     }

                 }
             })
         }
    })
</script>
<frameset cols="250px,*" border="0">
    <frameset rows="250px,*" border="0">
        <frame name="lefttop" noresize scrolling="no" src="Adminlefttop.jsp" class="lefttop">
        <frame name="leftbottom" noresize scrolling="no" src="Adminleftbuttom.jsp" class="leftbottom">
    </frameset>
    <frameset rows="230px,*" frameborder="yes" border="0">
        <frame id="top" src="Adminrighttop.jsp" name="righttop" noresize scrolling="auto" style="padding-top: 10px;border-bottom: 2px solid #cccccc">
        <frame class="right" name="rightbottom" noresize scrolling="no">
    </frameset>
</frameset>
</html>